| Plant | Flowers | Date | lon | lat | ele | Month | Year | julian |
|---|---|---|---|---|---|---|---|---|
| Glossoloma oblongicalyx | 4 | 2015-10-19 | -78.59093 | 0.130838 | 2270 | October | 2015 | 292 |
| Gasteranthus quitensis | 2 | 2016-10-17 | -78.59770 | 0.120070 | 1940 | October | 2016 | 291 |
| Kohleria affinis | 1 | 2016-12-13 | -78.59534 | 0.126746 | 2110 | December | 2016 | 348 |
| Columnea ciliata | 3 | 2014-02-27 | -78.59934 | 0.116682 | 1960 | February | 2014 | 58 |
| Columnea medicinalis | 1 | 2014-04-23 | -78.59372 | 0.128700 | 2130 | April | 2014 | 113 |
| Drymonia teuscheri | 3 | 2016-07-28 | -78.59245 | 0.129393 | 2200 | July | 2016 | 210 |
| Plant | Flowers | Date | lon | lat | ele | Month | Year | julian |
|---|---|---|---|---|---|---|---|---|
| Glossoloma oblongicalyx | 4 | 2015-10-19 | -78.59093 | 0.130838 | 2270 | October | 2015 | 292 |
| Gasteranthus quitensis | 2 | 2016-10-17 | -78.59770 | 0.120070 | 1940 | October | 2016 | 291 |
| Kohleria affinis | 1 | 2016-12-13 | -78.59534 | 0.126746 | 2110 | December | 2016 | 348 |
| Columnea ciliata | 3 | 2014-02-27 | -78.59934 | 0.116682 | 1960 | February | 2014 | 58 |
| Columnea medicinalis | 1 | 2014-04-23 | -78.59372 | 0.128700 | 2130 | April | 2014 | 113 |
| Drymonia teuscheri | 3 | 2016-07-28 | -78.59245 | 0.129393 | 2200 | July | 2016 | 210 |
As range
Check date integrity
## sink("model/Poisson_baseline.jags")
## cat("
## model {
##
## for (x in 1:Dates){
## for (y in 1:Plants){
## #Observation of a flowering plant
## Y[x,y] ~ dpois(p[x,y])
## log(p[x,y]) <- alpha[y]
##
## #Residuals
## discrepancy[x,y] <- pow(Y[x,y] - p[x,y],2)
##
## #Assess Model Fit
## Ynew[x,y] ~ dpois(p[x,y])
## discrepancy.new[x,y]<-pow(Ynew[x,y] - p[x,y],2)
## }
## }
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for (x in 1:NewDates){
## for (y in 1:Plants){
##
## #predict value
##
## #Observation - probability of flowering
## prediction[x,y] ~ dpois(p_new[x,y])
## log(p_new[x,y])<-alpha[y]
##
## #squared predictive error
## pred_error[x,y] <- pow(Ypred[x,y] - prediction[x,y],2)
## }
## }
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.001)
##
## }
##
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2926
## Unobserved stochastic nodes: 3444
## Total graph size: 14251
##
## Initializing model
## sink("model/Poisson_attraction.jags")
## cat("
## model {
##
## for (x in 1:Dates){
## for (y in 1:Plants){
## #Observation of a flowering plant
## Y[x,y] ~ dpois(p[x,y])
## log(p[x,y]) <- alpha[y] + e[x,y]
##
## #Residuals
## discrepancy[x,y] <- pow(Y[x,y] - p[x,y],2)
##
## #Assess Model Fit
## Ynew[x,y] ~ dpois(p[x,y])
## discrepancy.new[x,y]<-pow(Ynew[x,y] - p[x,y],2)
## }
## }
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for (x in 1:NewDates){
## for (y in 1:Plants){
##
## #predict value
##
## #Observation - probability of flowering
## prediction[x,y] ~ dpois(p_new[x,y])
## log(p_new[x,y])<-alpha[y] + e_new[x,y]
##
## #squared predictive error
## pred_error[x,y] <- pow(Ypred[x,y] - prediction[x,y],2)
## }
## }
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(k in 1:Dates){
## e[k,1:Plants] ~ dmnorm(zeros,tauC[,])
## }
##
## #For each prediction
## for(k in 1:NewDates){
## e_new[k,1:Plants] ~ dmnorm(zeros,tauC[,])
## }
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=inverse(vCov*gamma)
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.001)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,20)
##
## #Strength of covariance decay
## lambda_cov = 1
## omega ~ dbeta(1,1)
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2926
## Unobserved stochastic nodes: 3691
## Total graph size: 30586
##
## Initializing model
Mean phylogenetic covariance
## sink("model/Poisson_repulsion.jags")
## cat("
## model {
##
## for (x in 1:Dates){
## for (y in 1:Plants){
## #Observation of a flowering plant
## Y[x,y] ~ dpois(p[x,y])
## log(p[x,y]) <- alpha[y] + e[x,y]
##
## #Residuals
## discrepancy[x,y] <- pow(Y[x,y] - p[x,y],2)
##
## #Assess Model Fit
## Ynew[x,y] ~ dpois(p[x,y])
## discrepancy.new[x,y]<-pow(Ynew[x,y] - p[x,y],2)
## }
## }
##
## #Sum discrepancy
## fit<-sum(discrepancy)/Nobs
## fitnew<-sum(discrepancy.new)/Nobs
##
## #Prediction
##
## for (x in 1:NewDates){
## for (y in 1:Plants){
##
## #predict value
##
## #Observation - probability of flowering
## prediction[x,y] ~ dpois(p_new[x,y])
## log(p_new[x,y])<-alpha[y] + e_new[x,y]
##
## #squared predictive error
## pred_error[x,y] <- pow(Ypred[x,y] - prediction[x,y],2)
## }
## }
##
## #Predictive Error
## fitpred<-sum(pred_error)/Npreds
##
## #########################
## #autocorrelation in error
## #########################
##
## #For each of observation
## for(k in 1:Dates){
## e[k,1:Plants] ~ dmnorm(zeros,tauC[,])
## }
##
## #For each prediction
## for(k in 1:NewDates){
## e_new[k,1:Plants] ~ dmnorm(zeros,tauC[,])
## }
##
## ##covariance among similiar species
## for(i in 1:Plants){
## for(j in 1:Plants){
## C[i,j] = exp(-lambda_cov * D[i,j])
## }
## }
##
## ## Covert variance to precision for each parameter, allow omega to shrink to identity matrix
## vCov = omega*C[,] + (1-omega) * I
## tauC=vCov*gamma
##
## #Priors
##
## #Species level priors
##
## for (j in 1:Plants){
##
## #Intercept
## #Intercept flowering count
## alpha[j] ~ dnorm(0,0.001)
##
## }
##
## #Autocorrelation priors
## gamma ~ dunif(0,20)
##
## #Strength of covariance decay
## lambda_cov = 1
## omega ~ dbeta(1,1)
## }
## ",fill=TRUE)
##
## sink()
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2926
## Unobserved stochastic nodes: 3691
## Total graph size: 30585
##
## Initializing model
Mean phylogenetic covariance martix
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2926
## Unobserved stochastic nodes: 3691
## Total graph size: 30742
##
## Initializing model
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2926
## Unobserved stochastic nodes: 3691
## Total graph size: 30741
##
## Initializing model
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2926
## Unobserved stochastic nodes: 3691
## Total graph size: 30742
##
## Initializing model
Mean interaction covariance
## Compiling model graph
## Resolving undeclared variables
## Allocating nodes
## Graph information:
## Observed stochastic nodes: 2926
## Unobserved stochastic nodes: 3691
## Total graph size: 30741
##
## Initializing model
Mean interaction covariance martix
The probability of occurrence.
## # A tibble: 6 x 2
## Model p
## <chr> <dbl>
## 1 interaction_attraction 0.522
## 2 interaction_repulsion 0.492
## 3 phylogenetic_attraction 0.505
## 4 phylogenetic_repulsion 0.49
## 5 trait_attraction 0.452
## 6 trait_repulsion 0.525
| Model | mean | lower | upper |
|---|---|---|---|
| trait_attraction | 2.418181 | 2.084980 | 2.790639 |
| phylogenetic_repulsion | 2.411806 | 2.089727 | 2.794331 |
| trait_repulsion | 2.391713 | 2.051739 | 2.747518 |
| interaction_repulsion | 2.388664 | 2.086966 | 2.713546 |
| interaction_attraction | 2.387773 | 2.044458 | 2.761761 |
| phylogenetic_attraction | 2.375222 | 2.060701 | 2.743851 |
Without baseline
Zoom in
| Model | mean | lower | upper |
|---|---|---|---|
| phylogenetic_attraction | 16801.08890 | 174.6443 | 14849.82192 |
| interaction_attraction | 13302.94695 | 119.6427 | 17460.92093 |
| trait_attraction | 9508.92972 | 138.7701 | 22176.49950 |
| trait_repulsion | 5178.11078 | 124.2442 | 14763.12411 |
| interaction_repulsion | 5127.10258 | 139.3778 | 16753.41121 |
| phylogenetic_repulsion | 4288.24908 | 143.2137 | 17409.50813 |
| baseline | 39.84858 | 37.7498 | 41.95456 |